package com.wjs.juc.Interrupt;

/**
 * Thread.interrupted()方法底层其实和实例方法isInterrupted()底层调用的是同一个native方法
 */
public class InterruptDemo4 {
    public static void main(String[] args) {
        System.out.println(Thread.currentThread().getName()+":"+Thread.interrupted());
        System.out.println(Thread.currentThread().getName()+":"+Thread.interrupted());
        System.out.println(1);
        Thread.currentThread().interrupt();
        System.out.println(2);
        System.out.println(Thread.currentThread().getName()+":"+Thread.interrupted());
        System.out.println(Thread.currentThread().getName()+":"+Thread.interrupted());
    }
}
